package com.pactera.asmp.server.common.constants;

/**
 * @ProjectName: tlsserver
 * @Package com.pactera.asmp.server.common.constants
 * @ClassName: Constants
 * @Description: 公共常量类
 * @Date 2020/06/02 6:26
 * @Author lvzhiqiang
 * @Version 1.0
 */
public class Constants {

    private Constants(){}
    /**
     * 脚本历史记录脚本新增
     */
    public static final Integer SCRIPT_HISTORY_STATUS_1 = 1;

    /**
     * 脚本历史记录脚本修改
     */
    public static final Integer SCRIPT_HISTORY_STATUS_2 = 2;

    /**
     * 脚本历史记录脚本删除
     */
    public static final Integer SCRIPT_HISTORY_STATUS_3 = 3;

    /**
     * can 绑定的上位机和设备状态redisKey前缀
     */
    public static final String REDIS_KEY_PREFIX_CAN_BIND = "CAN_BIND";

    /**
     * can 绑定的上位机和设备状态的过期时间，秒
     */
    public static final Long REDIS_KEY_CAN_BIND_EXPIRE = 60L;

    /**
     * can 信息在线状态
     */
    public static final byte CAN_INFO_STATE_1 = 1;

    /**
     * can 信息离线状态
     */
    public static final byte CAN_INFO_STATE_2 = 2;


    /**
     * 公共业务直接交换机
     */
    public static final String COMMON_DIRECT_EXCHANGE = "common.direct.exchange";

    /**
     * 插件配置队列名
     */
    public static final String PLUGIN_CONFIG_QUEUE = "plugin_config_queue";

    /**
     * 插件配置队列路由名
     */
    public static final String PLUGIN_CONFIG_ROUTINGKEY = "plugin_config_routing_key";

    /**
     * 插件配置生成的apk结果队列名
     */
    public static final String PLUGIN_CONFIG_APK_RESULT_QUEUE = "plugin_config_apk_result_queue";

    /**
     * 首尾不能输入空格
     */
    public static final String REGEXP_FIRST_LAST_NOT_SPACE = "^[^\\s]+(\\s+[^\\s]+)*$";

    /**
     * redis中token key(asmp:login:access:token:{channelId}:{id})
     */
    public static final String REDIS_TOKEN_KEY = "asmp:login:access:token:";
//    /**
//     * 不支持输入特殊字符(￥#%…&*@ 以及空格)
//     */
//    public static final String REGEXP_NOT_SPECIAL_CHARACTER = "^[^￥#%…&*@\\s]*$";

}
